-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: infinite approval doesn't persist after transfer #217
Conversation
BTW any reason we can't just inherit OpenZeppelin's ERC20? Personally, I would feel more comfortable. |
I think it’s because we just renamed LUSD from v1 (and I don’t remember why we did that way then). But I agree, I would just import OpenZeppelin ECR20. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (although again, I would import OZ ERC20 instead)
I'll give it a go, but if it takes more than 20 minutes, I'll just merge this one and leave OZ for another time. |
Perfect!! Thanks! |
It turned out to be really easy. |
Hey, I'm taking some time off and have limited access to my emails until
July 8.
My colleague Bianka ***@***.***) is monitoring my inbox.
Stay curious, Cédric
…On Fri, 21 Jun 2024 04:36:50 +0200, Daniel Simon ***@***.***) wrote:
Merged #217 <#217> into main.
—
Reply to this email directly, view it on GitHub
<#217 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBDRTC3M767FCZ7K2CC2DZIOGUFAVCNFSM6AAAAABJPVSEUCVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGIZTMNJRGYZDSNA>.
You are receiving this because you are subscribed to this thread.[image:
]Message ID: ***@***.***>
|
This fixes a know quirk of LUSD/BOLD, wherein an infinite approval is "only" practically infinite, but actually decreases upon each transfer. This made it trickier to detect infinite approvals in the v1 frontend (in the case of ChickenBonds).
This change makes it so infinite approvals stay infinite even after a transfer, which is also what OpenZeppelin does since some time ago:
OpenZeppelin/openzeppelin-contracts#3085